package com.chat.service;

import com.chat.pojo.Users;
import com.chat.pojo.vo.FriendRequestVO;
import com.chat.pojo.vo.MyFriendsVO;

import java.util.List;

public interface UserService {
    public boolean queryUserIsExist(String username);

    public Users queryUserLogin(String username,String password);

    public Users userRegist(Users user);

    Users updateUserInfo(Users users);

    Integer preconditionSearchFriends(String myUserId, String friendUsername);

    Users queryUserInfoByUsername(String friendUsername);

    void sendFriendRequest(String myUserId,String friendUsername);

    /**
     * 查询好友请求
     * @param acceptUserId
     * @return
     */
    List<FriendRequestVO> queryFriendRequestList(String acceptUserId);

    /**
     * 删除好友请求
     */
    void deleteFriendRequest(String sendUserId, String acceptUserId);

    /**
     * 通过好友请求
     */
    void passFriendRequest(String sendUserId, String acceptUserId);

    /**
     * 查询好友列表
     * @param userId 用户ID
     * @return
     */
    List<MyFriendsVO> queryMyFriends(String userId);
}
